Skip to content

Upgrade Django to 6.0.5 and add django-tasks configuration#4633

Open
marcoacierno wants to merge 5 commits intomainfrom
claude/fix-ci-failures-BOXmo
Open

Upgrade Django to 6.0.5 and add django-tasks configuration#4633
marcoacierno wants to merge 5 commits intomainfrom
claude/fix-ci-failures-BOXmo

Conversation

@marcoacierno
Copy link
Copy Markdown
Member

What

  • Upgraded Django from 5.2.8 to 6.0.5
  • Updated django-timezone-field to >=7.1 (was pinned to 7.0)
  • Updated django-autocomplete-light to 4.0.0 (was 3.9.4)
  • Added django-tasks configuration with immediate backend for task execution

The django-tasks configuration uses the ImmediateBackend which executes tasks synchronously, suitable for development and testing environments.

ToDo

  • Verify Django 6.0.5 compatibility with existing codebase
  • Test task execution with the immediate backend
  • Update documentation if needed for new dependencies

https://claude.ai/code/session_012iLUaDFSVctE7tbLx6RTyF

dependabot Bot and others added 4 commits May 5, 2026 22:22
Bumps [django](https://github.com/django/django) from 5.2.8 to 6.0.5.
- [Commits](django/django@5.2.8...6.0.5)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 6.0.4
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
django-timezone-field 7.0 requires django>=3.2,<6.0, which conflicts
with the Django 6.0.5 upgrade. Updating to >=7.1 for Django 6.0 support.

Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
- Set TASKS to django_tasks ImmediateBackend so modelsearch keeps working
  (Django 6.0 ships its own django.tasks.* with a different Task signature
  that lacks `enqueue_on_commit`, which broke the modelsearch @task decorator).
- Bump django-autocomplete-light from 3.9.4 to 4.0.0 (3.9.4 imports the
  removed `django.utils.itercompat` module).
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pycon Error Error May 6, 2026 10:05pm

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.52%. Comparing base (edac1af) to head (74929df).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4633   +/-   ##
=======================================
  Coverage   92.52%   92.52%           
=======================================
  Files         359      359           
  Lines       10791    10792    +1     
  Branches      821      821           
=======================================
+ Hits         9984     9985    +1     
  Misses        696      696           
  Partials      111      111           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 6, 2026

This PR upgrades Django from 5.2.8 to 6.0.5 (major version bump), updates several dependencies (django-autocomplete-light, django-timezone-field, wagtail-localize, pydantic), and adds django-tasks as an explicit dependency with a TASKS setting.

Issues

ImmediateBackend in base.py will run in production with no override

backend/pycon/settings/base.py sets ImmediateBackend as the default and prod.py has no TASKS override. This means all django-tasks workloads (Wagtail modelsearch indexing) will run synchronously inside the HTTP request/response cycle in production, adding unbounded latency to any admin action that triggers indexing. The existing pattern in this codebase is to set safe defaults in base.py and override in prod.py (e.g., CELERY_BROKER_URL, STORAGES, CACHES). A DatabaseBackend or similar async backend should be configured in prod.py.

Wagtail 7.2.3 does not officially support Django 6.0

wagtail==7.2.3 supports Django 4.2, 5.1, and 5.2 — Django 6.0 support was added in Wagtail 7.3. Running 7.2.3 with Django 6.0 is outside the supported matrix; breakage may be subtle and not caught by tests. wagtail-headless-preview==0.8.0 (released Feb 2024) likely has the same gap. This is also one of the PR's own open TODO items.

django-tasks 0.8.1 predates Django 6.0's built-in django.tasks module

The lockfile pins django-tasks==0.8.1 (released July 2025). Django 6.0 ships its own built-in django.tasks module with a different API (notably, Task lacks enqueue_on_commit). The PR acknowledges this conflict, but the lock file has not been regenerated to a version that explicitly supports Django 6.0. Anyone running uv sync will get 0.8.1 regardless of the >=0.8,<0.13 range in pyproject.toml.

django_tasks missing from INSTALLED_APPS

The django-tasks docs recommend adding django_tasks to INSTALLED_APPS. It is required for DatabaseBackend migrations, and omitting it when switching backends later will cause a non-obvious failure.

@marcoacierno marcoacierno deployed to pastaporto May 6, 2026 02:38 — with GitHub Actions Active
- django-timezone-field: >=7.1 -> >=7.1,<8.0 to prevent unintended major
  version bumps from future `uv lock` runs.
- django-tasks: promoted from transitive (via wagtail/modelsearch) to a
  direct dependency, since pycon settings reference its
  ImmediateBackend in TASKS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants